package cn.example.freid.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil extends Properties {
	
	private static final long serialVersionUID = 1L;
	private static PropertiesUtil pu;
	
	private PropertiesUtil() throws IOException{
		InputStream is = getClass().getResourceAsStream("config.properties");
		load(is);
	}
	
	public static String get(String key) throws IOException {
		if (pu == null)
			pu = new PropertiesUtil();
		return pu.getProperty(key);
	}
	
	
}
